#ifndef COMPOSITION__VIDEO_READER_H__
#define COMPOSITION__VIDEO_READER_H__

#include "rclcpp/rclcpp.hpp"
#include "sensor_msgs/msg/image.hpp"
#include "base_interfaces/msg/mat_with_time.hpp"
#include <cv_bridge/cv_bridge.hpp>
#include "libbase/common.h"

#include <opencv2/opencv.hpp>

namespace wmj
{
    class RosVideoReader : public rclcpp::Node
    {
    private:
        cv::VideoCapture cap;
        rclcpp::Publisher<base_interfaces::msg::MatWithTime>::SharedPtr imagePublisher;
        rclcpp::TimerBase::SharedPtr publishImageTimer;

    public:
        RosVideoReader(const rclcpp::NodeOptions & options);
        ~RosVideoReader();

        void publishImage();
    };
    
}

#endif //COMPOSITION__VIDEO_READER_H__